package proxy.cglib;

import net.sf.cglib.proxy.Enhancer;
import proxy.SellHouseOneService;
import proxy.SellHouseService;

/**
 * @Author quan
 * @Description 创建代理类并使用
 * @Date 2023/7/28 16:10
 */
public class Main {
    public static void main(String[] args) {
        SellHouseService target= new SellHouseOneService();
        SellHouseService proxy= (SellHouseService) Enhancer.create(target.getClass(),
                new CGLIBInterceptor(target));
        proxy.sell();
    }
}
